<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../estilos/style.css" rel="stylesheet" type="text/css" />
<title>LABTEC - Eliminar Laboratorio</title>
<%@ taglib prefix="s" uri="/struts-tags"%>
<script type="text/javascript">
	function deleteLab(codLabo, nombreLabo, codigoDepto, ini) {
		eliminar = confirm("¿Está seguro de que desea eliminar el "
				+ nombreLabo + "?");

		if (eliminar) {
			document.forms[0].codLab.value = codLabo;
			document.forms[0].depto.value = codigoDepto;
			document.forms[0].nombreLab.value = nombreLabo;
			document.forms[0].iniciales.value = ini;
			document.forms[0].submit();
		}

	}
</script>
</head>
<body>
	<div id="header">
		    <jsp:include page="menuAdministrador.jsp" />
	</div>
	<div class="sheet">
		<div class="sheet-tl"></div>
		<div class="sheet-tr"></div>
		<div class="sheet-bl"></div>
		<div class="sheet-br"></div>
		<div class="sheet-tc"></div>
		<div class="sheet-bc"></div>
		<div class="sheet-cl"></div>
		<div class="sheet-cr"></div>
		<div class="sheet-cc"></div>
		<div class="sheet-body">
			<h5 class="postcontent">Eliminar Laboratorio</h5>
			<br />

			<table class="article">
				<thead>
					<tr>
						<th>Cod laboratorio</th>
						<th>Nombre</th>
						<th>Iniciales</th>
						<th>Departamento</th>
						<th>Eliminar</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="laboratorioList" var="laboratorio">
						<tr>
							<td><s:property value="codLab" /></td>
							<td><s:property value="nombreLab" /></td>
							<td><s:property value="iniciales" /></td>
							<td><s:property value="departamento.nombreDepto" /></td>
							<td><input type="button" value="Eliminar"
								onclick="deleteLab('<s:property value="codLab"/>','<s:property value="nombreLab"/>',
									'<s:property value="departamento.codDepto"/>', '<s:property value="iniciales"/>');">
							</td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<br />
		</div>
	</div>
	<s:form action="eliminarLaboratorioAction">
		<s:hidden name="codLab"></s:hidden>
		<s:hidden name="depto"></s:hidden>
		<s:hidden name="iniciales"></s:hidden>
		<s:hidden name="nombreLab"></s:hidden>
	</s:form>
</body>
</html>